import Vue from 'vue'
import Vuex from 'vuex'


Vue.use(Vuex)
const debug = process.env.NODE_ENV !== 'production'

const store = new Vuex.Store({
    strict: debug,
    state: {
        nav_height: "",

        //  丰苗
        schoolInfo: {},
        userInfo: {}, //用户信息
        allPermission:{},
        supplierList:[], //供应商
        detailData:{},  // 详情数据 

    },
    mutations: {
        // 丰苗
        getSchoolInfo(state, payload) {
            state.schoolInfo = payload
        },
        getUserInfo(state, payload) {
            state.userInfo = payload
        },
        getAllpermission(state,payload){
            state.allPermission = payload;
        },
        // 供应商
        getSupplierList(state,payload){ 
            state.supplierList = payload
        },
        setDetailData(state,payload){
            state.detailData = payload; 
        },
        setNavHeight(state,payload){
            state.nav_height = payload;
        }
    }
})
export default store
